/*
 * mpl3115a2.h
 *
 *  Created on: Apr 12, 2021
 *      Author: soliber
 */

#ifndef MPL3115A2_DRIVER_MPL3115A2_H_
#define MPL3115A2_DRIVER_MPL3115A2_H_


#define MPL_ACTIVED    		 		1
#define MPL_STANDBY 				0
#define POLL_INTERVAL_MAX			500
#define POLL_INTERVAL				100
#define POLL_INTERVAL_MIN			1
#define MPL3115_ID					0xc4
#define MPLL_ACTIVE_MASK       		0x01
#define MPL3115_STATUS_DR			0x08

/*MPL3115A register address*/
#define MPL3115_STATUS				0x00
#define MPL3115_PRESSURE_DATA		0x01
#define MPL3115_DR_STATUS			0x06
#define MPL3115_DELTA_DATA			0x07
#define MPL3115_WHO_AM_I 			0x0c
#define MPL3115_FIFO_STATUS 		0x0d
#define MPL3115_FIFO_DATA 			0x0e
#define MPL3115_FIFO_SETUP 			0x0e
#define MPL3115_TIME_DELAY 			0x10
#define MPL3115_SYS_MODE 			0x11
#define MPL3115_INT_SORCE 			0x12
#define MPL3115_PT_DATA_CFG 		0x13
#define MPL3115_BAR_IN_MSB 			0x14
#define MPL3115_P_ARLARM_MSB 		0x16
#define MPL3115_T_ARLARM			0x18
#define MPL3115_P_ARLARM_WND_MSB	0x19
#define MPL3115_T_ARLARM_WND		0x1b
#define MPL3115_P_MIN_DATA			0x1c
#define MPL3115_T_MIN_DATA			0x1f
#define MPL3115_P_MAX_DATA			0x21
#define MPL3115_T_MAX_DATA			0x24
#define MPL3115_CTRL_REG1			0x26
#define MPL3115_CTRL_REG2			0x27
#define MPL3115_CTRL_REG3			0x28
#define MPL3115_CTRL_REG4			0x29
#define MPL3115_CTRL_REG5			0x2a
#define MPL3115_OFFSET_P			0x2b
#define MPL3115_OFFSET_T			0x2c
#define MPL3115_OFFSET_H			0x2d



#endif /* MPL3115A2_DRIVER_MPL3115A2_H_ */
